#ifndef INCLUDED_jax_JVM
#define INCLUDED_jax_JVM

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS0(Hash)
HX_DECLARE_CLASS1(haxe,Public)
HX_DECLARE_CLASS2(haxe,io,Bytes)
HX_DECLARE_CLASS2(haxe,io,BytesInput)
HX_DECLARE_CLASS2(haxe,io,Input)
HX_DECLARE_CLASS1(jax,JAttribute)
HX_DECLARE_CLASS1(jax,JConstant)
HX_DECLARE_CLASS1(jax,JVM)
HX_DECLARE_CLASS1(jax,JValue)
HX_DECLARE_CLASS2(jax,lang,JClass)
HX_DECLARE_CLASS2(jax,lang,JObject)
namespace jax{


class JVM_obj : public hx::Object{
	public:
		typedef hx::Object super;
		typedef JVM_obj OBJ_;
		JVM_obj();
		Void __construct();

	public:
		static hx::ObjectPtr< JVM_obj > __new();
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		~JVM_obj();

		HX_DO_RTTI;
		static void __boot();
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_CSTRING("JVM"); }

		static Dynamic stack; /* REM */ 
		static ::Hash classes; /* REM */ 
		static ::Hash externs; /* REM */ 
		static int CLASS_REF_INDEX; /* REM */ 
		static int resolveRef( ::jax::JConstant c);
		static Dynamic resolveRef_dyn();

		static ::jax::lang::JClass readClass( ::haxe::io::BytesInput b);
		static Dynamic readClass_dyn();

		static ::jax::JAttribute readAttribute( Array< ::jax::JConstant > pool,::haxe::io::BytesInput i);
		static Dynamic readAttribute_dyn();

		static Dynamic toNativeValue( ::jax::JValue v);
		static Dynamic toNativeValue_dyn();

		static Void runClass( ::String name);
		static Dynamic runClass_dyn();

		static Void gc( );
		static Dynamic gc_dyn();

		static Void readJarPath( ::String p);
		static Dynamic readJarPath_dyn();

		static Void readJar( ::haxe::io::BytesInput bi);
		static Dynamic readJar_dyn();

		static Void addClass( ::Class c);
		static Dynamic addClass_dyn();

		static Void init( );
		static Dynamic init_dyn();

		static Void main( );
		static Dynamic main_dyn();

		static ::jax::JValue toValue( ::jax::JConstant c,Array< ::jax::JConstant > pool);
		static Dynamic toValue_dyn();

		static ::jax::JValue exec( ::jax::lang::JClass c,::haxe::io::Bytes b,Dynamic lvars);
		static Dynamic exec_dyn();

		static bool dor_long( ::jax::JValue v);
		static Dynamic dor_long_dyn();

		static ::jax::JValue initArray( int dims,Array< ::jax::JValue > stack);
		static Dynamic initArray_dyn();

		static ::jax::JValue fromNativeValue( Dynamic d);
		static Dynamic fromNativeValue_dyn();

		static ::jax::JValue copy( ::jax::JValue v);
		static Dynamic copy_dyn();

		static ::String stringConst( ::jax::JConstant s);
		static Dynamic stringConst_dyn();

		static ::jax::JValue solveMethodRef( ::jax::JValue obj,Array< ::jax::JConstant > pool,::jax::JConstant method,Array< ::jax::JValue > args);
		static Dynamic solveMethodRef_dyn();

		static int gname( ::jax::JConstant c);
		static Dynamic gname_dyn();

		static int solveClassRef( ::jax::JConstant ref);
		static Dynamic solveClassRef_dyn();

};

} // end namespace jax

#endif /* INCLUDED_jax_JVM */ 
